const AllMenuList = [
  {
    id: 1,
    label: "展会管理",
    path: "/exhibition",
    icon: "icon-yanzhengma",
    component: "views/exhibition/index",
    children: [],
  },
  {
    id: 2,
    label: "商城管理",
    path: "/mall",
    icon: "icon-iframe",
    children: [
      {
        id: 2001,
        label: "轮播图",
        path: "picture",
        component: "views/mall/picture",
        children: [],
      },
      {
        id: 2002,
        label: "首页弹窗",
        path: "popup",
        component: "views/mall/popup",
        children: [],
      },
      {
        id: 2003,
        label: "商品分类",
        path: "goodsCategory",
        redirect: "/category/first",
        children: [
          {
            id: 2003001,
            label: "一级分类",
            path: "first",
            component: "views/mall/goodsCatFirst",
            children: [],
          },
          {
            id: 2003002,
            label: "二级分类",
            path: "second",
            component: "views/mall/goodsCatSecond",
            children: [],
          },
        ],
      },
      {
        id: 2004,
        label: "商品管理",
        path: "goods",
        component: "views/mall/goods",
        children: [],
      },
    ],
  },
  {
    id: 9,
    label: "用户管理",
    path: "/user",
    icon: "icon-yonghuguanli",
    component: "views/user/index",
    children: [],
  },
  {
    id: 10,
    label: "员工管理",
    path: "/staff",
    icon: "icon-yonghu",
    component: "views/staff/index",
    children: [],
  },
  {
    id: 11,
    label: "商户管理",
    path: "/store",
    icon: "icon-tubiao",
    children: [
      {
        id: 5001,
        label: "商户列表",
        path: "shop",
        component: "views/store/shop",
        children: [],
      },
      {
        id: 5002,
        label: "商户审批",
        path: "audit",
        component: "views/store/audit",
        children: [],
      },
      {
        id: 5003,
        label: "评价列表",
        path: "comment",
        component: "views/store/comment",
        children: [],
      },
    ],
  },
  {
    id: 15,
    label: "维修管理",
    path: "/service",
    icon: "icon-wxbgongju",
    children: [
      {
        id: 6001,
        label: "维修订单",
        path: "order",
        component: "views/service/order",
        children: [],
      },
      {
        id: 6002,
        label: "问题管理",
        path: "question",
        component: "views/service/question",
        children: [],
      },
    ],
  },
  {
    id: 18,
    label: "订单管理",
    path: "/order",
    icon: "icon-biaodan",
    children: [
      {
        id: 7001,
        label: "订单列表",
        path: "list",
        component: "views/order/list",
        children: [],
      },
      {
        id: 7002,
        label: "订单设置",
        path: "setting",
        component: "views/order/setting",
        children: [],
      },
    ],
  },
  {
    id: 37,
    label: "优惠券管理",
    path: "/coupon",
    icon: "icon-caidanguanli",
    children: [
      {
        id: 8001,
        label: "优惠券使用列表",
        path: "list",
        component: "views/coupon/index",
        children: [],
      },
    ],
  },
  {
    id: 39,
    label: "财务管理",
    path: "/finance",
    icon: "icon-rizhi",
    children: [
      {
        id: 9001,
        label: "提现列表",
        path: "withdraw",
        component: "views/finance/withdraw",
        children: [],
      },
      {
        id: 9002,
        label: "佣金设置",
        path: "commission",
        component: "views/finance/commission",
        children: [],
      },
    ],
  },
  {
    id: 42,
    label: "数据统计",
    path: "/data",
    icon: "icon-shujuzhanshi2",
    children: [
      {
        id: 10008,
        label: "数据统计",
        path: "data",
        component: "views/data/data",
        children: [],
      },
      {
        id: 10001,
        label: "地域统计",
        path: "range",
        component: "views/data/range",
        children: [],
      },
      {
        id: 10002,
        label: "展会统计",
        path: "exhibition",
        component: "views/data/exhibition",
        children: [],
      },
      {
        id: 10003,
        label: "商品支付排行",
        path: "goods",
        component: "views/data/goods",
        children: [],
      },
      {
        id: 10004,
        label: "维修统计",
        path: "maintain",
        component: "views/data/maintain",
        children: [],
      },
      {
        id: 10005,
        label: "维修类型统计",
        path: "type",
        component: "views/data/type",
        children: [],
      },
      {
        id: 10006,
        label: "用户统计",
        path: "user",
        component: "views/data/user",
        children: [],
      },
      {
        id: 10007,
        label: "商家统计",
        path: "merchant",
        component: "views/data/merchant",
        children: [],
      },
    ],
  },
  {
    id: 51,
    label: "权限管理",
    path: "/authority",
    icon: "icon-quanxian",
    children: [
      {
        id: 11001,
        label: "账户管理",
        path: "account",
        component: "views/authority/account",
        children: [],
      },
      {
        id: 11002,
        label: "角色管理",
        path: "role",
        component: "views/authority/role",
        children: [],
      },
    ],
  },
];

function getRoleMenuList(ids = []) {
  const menu = [];
  AllMenuList.forEach((item) => {
    if (ids.includes(item.id)) {
      menu.push(item);
    }
  });
  return menu;
}

export { getRoleMenuList };
